how to create a custom expected condition class in selenium